const util = require('../utils/util.js');
const api = require('../config/api.js');

/**
 * 获取轮播图
 */
function getBanner(cateId) {
    return new Promise(function(resolve, reject) {
        util.request(api.BannersIndex, {id: cateId}).then((res) => {
            if (res.code == 0) {
                resolve(res);
            } else {
                reject(res);
            }
        });
    });
}
module.exports = {
    getBanner
};